Tag Info

Hot answers tagged

12

Add this to your ~/.zshrc alias sudo='nocorrect sudo'


8

I am unable to give a detailed report of their differences but I can at least give a broad overview that may help to answer some basic questions and lead you to places where you can learn more. oh-my-zsh: Built-in plugin/theme system Auto updater for core, plugins, and themes Default behavior easily overridden or extended Widely popular (which means an ...


5

If the characters on your command line are sometimes displayed at an offset, this is often because zsh has computed the wrong width for the prompt. The symptoms are that the display looks fine as long as you're adding characters or moving character by character but becomes garbled (with some characters appearing further right than they should) when you use ...


4

_kadmin is probably a completer function for the kadmin tool - not a directory. If you attempt completion on something that zsh can't find as a command, a directory or a valid and known command argument completion, it then starts to offer completion functions as possible expansion candidates. By default, zsh comes with a lot of completers, many of which you ...


4

The problem is in the order the files are sourced. LS_COLORS must be defined before you run zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}. You can fix this by renaming the files to something like 00theme-and-appearance.zsh and 01completion.zsh.


4

The prompt escape sequence %~ (included in $current_dir) expands to the current directory, taking abbreviations into account. The abbreviations are: ~ for your home directory; ~joe for the home directory of user joe; ~foo for a named directory: the directory aliased to foo with hash -d foo=…; ~[bar] for a dynamic named directory. You can use %/ instead ...


4

Thats three questions in one ;-) AUTO_CD Option and howto find it First of all the option you are looking for is AUTO_CD. You can easily find it by looking up man zshoptions. Use your pagers search function, usually you press / and enter the keyword. With n you jump to the next occurrence. This will bring up the following: [..] Changing Directories ...


3

The . command searches for the file in your $path, it does not by default search in the current directory. That is why it works when you give the absolute path ("$(pwd)"/.zshrc). From the zsh manual about the . command: . file [ arg ... ] Read commands from file and execute them in the current shell environment. If file does not contain a ...


3

.oh-my-zsh isn't used by anything but oh-my-zsh. If you use bash, you can just remove it. The instructions tell you to run the command uninstall_oh_my_zsh. This is a function that you can invoke from zsh running oh-my-zsh. If you aren't running oh-my-zsh, you can run tools/uninstall.sh, but all it does is: remove ~/.oh-my-zsh, which you were going to do ...


3

There is a plugin that claims to do exactly what you are looking for, appropriately named per directory history plugin: https://github.com/jimhester/oh-my-zsh/commit/baa187e4b903f39422a84b580e6e617ec3738e09 "Per-directory-history - tracks previous command history both per current directory and globally, with the ability to switch between them on the fly, ...


3

Shell's prompt Inside your virtualenv environment is a file, bin/activate. You can edit this file to change your prompt to whatever you want it to look like. Specifically this section of the file: ... else PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1" fi ... The variable PS1 is a special variable that controls what a shell's prompt will look like. Changing ...


3

For this: /Users/jack/.zshrc:source:34: no such file or directory: /Users/jack/.oh-my-zsh/oh-my-zsh.sh The problem is this line: source $ZSH/oh-my-zsh.sh You don't have a file called oh-my-zsh.sh in /Users/jack/.oh-my-zsh For this: /Users/jack/.zshrc:source:38: no such file or directory: .bashrc The problem is the same as above; essentially, you ...


3

To get back into the system you can boot into single user mode by appending the number 1 at the end of the linux kernel line within GRUB. The method for doing this is roughly outlined in this U&L Q&A titled: Can I launch a process as root without launching root's login shell?. Once you've done this you'll be dropped to a prompt as root from ...


3

The wording of your question is ambiguous, so I can't tell if you mean you want to stop using zsh or you want to stop using oh-my-zsh. I will cover both. Disabling zsh Simply run chsh and select whatever shell you were using before. If you don't know what shell you were using before, it is almost certainly bash. This command changes the "login shell" that ...


3

ZSH Config Switching If you want to test different zsh configuration frameworks (oh-my-zsh, zprezto, etc) and switch between them, your best bet is using symbolic links for ~/.zsh, ~/.zshrc, ~/.zlogin, ~/.zlogout, ~/.zprofile, and ~/.zshenv. You may want to create a shell scripts for each framework to create those symlinks for faster switching. Put your ...


2

As Thor pointed out in his comment, the autocompletion in braces only works, until you put the closing brace. So: touch dir/{some_file,other_f<TAB>(without the closing brace!) autocompletes the filename, so you get touch dir/{some_file,other_file touch dir/{some_file,other_f<TAB>}(with the closing brace!) expands the braces first, so you get ...


2

The option responsible for this behaviour is `cdable_vars'. It's not enabled by default. See the Manual's chapter about Options for details.


2

oh-my-zsh creates a few alias in .oh-my-zsh/lib/directories.zsh named 1, 2 ... 9 which expand to cd -, cd -1, etc. So time is functioning correctly, but the unexpected alias 1 actually does something. The reason why time's normal output isn't given is due to the fact cd is a builtin command that doesn't require forking.


2

As Skippy said, you should add them to the ~/.xinitrc file. This is because: /etc/rc.local executes at boot time, before the Xserver is up .zshrc gets loaded only when you start a zsh shell. /etc/xdg/lxsession/Lubuntu/autostart needs an special name and format: they should be named <something>.conf and has proper exec= values and be stored in ...


2

You tagged the question with oh-my-zsh, but did not mention it in the question. I suspect that oh-my-zsh is creating its own ls alias. If this happens after you define your alias, then it will override yours. You should probably uncomment DISABLE_LS_COLORS="true" in your .zshrc, or put your alias after the line that does source $ZSH/oh-my-zsh.sh.


2

Bash as a similar facility called bash completetion. You can make use of it by hitting the Tab key when providing arguments to commands when you're typing them. Example If I start by typing ls and then hitting Tab twice you'll get Bash to provide a list of matching files (and command line switches) to whatever command you're attempting to use: $ ls ...


2

while with ZDOTDIR, you can tell zsh to interpret a file called .zshrc in any directory of your choosing, having it interpret any file of your choosing (not necessarily called .zshrc) proves quite difficult. In sh or ksh emulation, zsh evaluates $ENV; so you could add emulate zsh at the top of your /path/to/file and do: ssh -t host 'zsh -c "ARGV0=sh ...


2

Login as root. Verify that zsh is installed. If not apt-get install zsh


1

This could be a consequence of running some code that clobbers the variable FPATH or fpath. Check the value of either of these variables; it should be a list of directories where zsh loads functions. The variables FPATH and fpath are tied (like PATH and path): changing one affects the other. The uppercase FPATH is a string which contains a colon-separated ...


1

I think that feature that OP is looking for is called dabbrev-expand in Emacs world: Expand the word in the buffer before point as a dynamic abbrev, by searching in the buffer for words starting with that abbreviation (v-expand). xterm also has dabbrev-expand feature but it's a bit less smart than Emacs counterpart but it's very useful to me and ...


1

I think you will find much interest in this. Seems like what is done is set a title with a small function in zsh to the current directory then run this before every command then trap that in screen... I don't think using hardstatus or caption makes a difference to the method: in .zshrc: function title { if [[ $TERM == "screen" ]]; then # Use these ...


1

Add this to your .zshrc and ..[TAB] will complete to ../ as per bash. zstyle ':completion:*' special-dirs true


1

Under Linux, the main effect of ps x is to include all processes running as the same user. By default, ps only includes processes running on the same terminal. In contrast, the BSD default is to include processes that have a controlling terminal, whether it's the same or not. The corresponding BSD option is -x. In addition, ps x selects a slightly different ...


1

You probably installed scm_breeze, and my theory is that in your .zshrc the sourcing of scm_breeze.sh is preceeded by oh-my-zsh.sh. And if you put your git function definition at the very end of .zshrc, then you probably exceed the scm_breeze.sh, so that's the reason why it works. Try to move the line that sources oh-my-zsh.sh to the very end of your ...


1

I don't really see how .xinitrc is relevant here. That file is read by xinit, an old way of starting an X session and one you are almost certainly not using. In most modern Linux systems, the X session is started by a login manager service, for example lightdm or gdm2 or whatever and not by xinit. Anyway, according to the LXDE wiki, you need to add these ...



Only top voted, non community-wiki answers of a minimum length are eligible