如何在zsh中添加“”到路径

时间:2016-09-03 04:20:18

标签: zsh oh-my-zsh zsh-completion

基本上,我想这样做,如果我运行命令,说

@Configuration
@EnableTransactionManagement
@ComponentScan({ "com.span.vms.configuration" })
@PropertySource(value = { "classpath:application.properties" })
public class HibernateConfiguration {

    @Autowired
    private Environment environment;

    @Bean
    @Primary
    public LocalSessionFactoryBean sessionFactory() {
        LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
        sessionFactory.setDataSource(dataSource());
        sessionFactory.setPackagesToScan(new String[] { "com.span.vms.model" });
        sessionFactory.setHibernateProperties(hibernateProperties());
        return sessionFactory;
    }

    @Bean(name = "eportalSessionFactory")
    public LocalSessionFactoryBean eportalSessionFactory() {
        LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
        sessionFactory.setDataSource(eportalDataSource());
        sessionFactory.setPackagesToScan(new String[] { "org.ctc.pm.model" });
        sessionFactory.setHibernateProperties(hibernateProperties());
        return sessionFactory;
    }

    @Bean
    public DataSource dataSource() {
        DriverManagerDataSource dataSource = new DriverManagerDataSource();
        dataSource.setDriverClassName(environment.getRequiredProperty("jdbc.driverClassName"));
        dataSource.setUrl(environment.getRequiredProperty("jdbc.url"));
        dataSource.setUsername(environment.getRequiredProperty("jdbc.username"));
        dataSource.setPassword(environment.getRequiredProperty("jdbc.password"));
        return dataSource;
    }

    @Bean
    public DataSource eportalDataSource() {
        DriverManagerDataSource dataSource = new DriverManagerDataSource();
        dataSource.setDriverClassName(environment.getRequiredProperty("jdbc.driverClassName"));
        dataSource.setUrl(environment.getRequiredProperty("jdbc.eportal.url"));
        dataSource.setUsername(environment.getRequiredProperty("jdbc.eportal.username"));
        dataSource.setPassword(environment.getRequiredProperty("jdbc.eportal.password"));
        return dataSource;
    }

    private Properties hibernateProperties() {
        Properties properties = new Properties();
        properties.put("hibernate.dialect", environment.getRequiredProperty("hibernate.dialect"));
        properties.put("hibernate.show_sql", environment.getRequiredProperty("hibernate.show_sql"));
        properties.put("hibernate.format_sql", environment.getRequiredProperty("hibernate.format_sql"));
        return properties;
    }

    @Bean(name = "txManager1")
    public HibernateTransactionManager transactionManager() {
        HibernateTransactionManager txManager = new HibernateTransactionManager();
        txManager.setSessionFactory(sessionFactory());
        return txManager;
    }

    @Bean(name = "txManager2")
    public HibernateTransactionManager transactionManager() {
        HibernateTransactionManager txManager = new HibernateTransactionManager();
        txManager.setSessionFactory(eportalSessionFactory());
        return txManager;
    }

它将用cd ~/Library/Application Support/ 替换该路径 这是可能吗?我还希望它适用于"~/Library/Application Support/"

中的路径

由于

1 个答案:

答案 0 :(得分:0)

通过创建符号链接,我能够解决我的具体问题 由于问题来自here,我无法手动使用制表符完成/更改路径。特别是shell集成 编辑:原来这个问题是由程序中的bug引起的。